DataHelperTest.javapackage ${beanPackageName};

import java.sql.Timestamp;

import com.ai.appframe2.bo.DataContainer;
import com.ai.appframe2.common.AIException;
import com.ai.appframe2.common.DataContainerInterface;
import com.ai.appframe2.common.DataType;
import com.ai.appframe2.common.ObjectType;
import com.ai.appframe2.common.ServiceManager;
import ${ivaluePackageName}.${ivalueClassName};

/**
* create by genbo tool, Don't modify!
* @auth genbo-tool
*/
public class ${beanClassName} extends DataContainer implements DataContainerInterface, ${ivalueClassName} {

	private static final long serialVersionUID = 1L;

	private static String m_boName = "${beanPackageName}.${boName}";

<#list allCols as column>
	public final static String S_${column.firstUpperName} = "${column.name}";
</#list>

	public static ObjectType S_TYPE = null;
	static {
		try {
			S_TYPE = ServiceManager.getObjectTypeFactory().getInstance(m_boName);
		} catch (Exception e) {
			throw new RuntimeException(e);
		}
	}

	public ${beanClassName}() throws AIException {
		super(S_TYPE);
	}

	public static ObjectType getObjectTypeStatic() throws AIException {
		return S_TYPE;
	}

	@Override
	public void setObjectType(ObjectType value) throws AIException {
		// 此种数据容器不能重置业务对象类型
		throw new AIException("Cannot reset ObjectType");
	}

<#list allCols as column>
	public void init${column.firstUpperName}(${column.javaType} value) {
		this.initProperty(S_${column.firstUpperName}, value);
	}

	@Override
	public void set${column.firstUpperName}(${column.javaType} value) {
		this.set(S_${column.firstUpperName}, value);
	}

	public void set${column.firstUpperName}Null() {
		this.set(S_${column.firstUpperName}, null);
	}

	@Override
	public ${column.javaType} get${column.firstUpperName}() {
		return DataType.getAs${column.dataType}(this.get(S_${column.firstUpperName}));

	}

	public ${column.javaType} get${column.firstUpperName}InitialValue() {
		return DataType.getAs${column.dataType}(this.getOldObj(S_${column.firstUpperName}));
	}

</#list>
}

